﻿@model Capokun.Models.Song
@{
    ViewBag.Title = "Créer une nouvelle chanson de Capoeira";
    ViewBag.Description = "Cette page permet de soumettre une nouvelle chanson de Capoeira à la communauté.";
    Layout = "~/Views/Shared/_Layout_fr-FR.cshtml";
}
<section id="content" class="body">
    <script>
        $(function () {
            $("#tabs").tabs({ selected: 2 });
        });
        $(document).ready(function () {
            $('a[href|="#tabs-1"]').click(function () {
                window.location = "@Url.Action("All")";
            });
            $('a[href|="#tabs-2"]').click(function () {
                window.location = "@Url.Action("Favorites")";
            });
            $('a[href|="#tabs-3"]').click(function () {
                window.location = "@Url.Action("Create")";
            });
        });
    </script>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Tous</a></li>
            <li><a href="#tabs-2">Favoris</a></li>
            <li><a href="#tabs-3">Créer une nouvelle chanson</a></li>
        </ul>
        <div id="tabs-1">
        </div>
        <div id="tabs-2">
        </div>
        <div id="tabs-3">
            @*<fb:login-button autologoutlink='true'  scope='email,user_birthday,status_update,publish_stream' ></fb:login-button>*@
            <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
            @using (Html.BeginForm())
            {
                @Html.ValidationSummary(true)
                <fieldset>
                    <legend></legend>
                    <div class="editor-label">
                        Partagé par <span class="redStar">*</span>
                    </div>
                    <div class="editor-field">
                        <fb:login-button data-show-faces="false" autologoutlink='false' perms='email,user_birthday,status_update,publish_stream'
                            id="fbLogingButton"></fb:login-button>
                        <div id="fbTextWithLoginButton">La création d'une nouvelle chanson nécessite une connexion à un compte Facebook</div>
                        <img id="loggedFbPicture" />
                        <div id="loggedFbName">
                        </div>
                        <br />
                        <br />
                        <br />
                        <input id="SubmittedBy" class="hiddenField" name="SubmittedBy" data-val-required="La création d'une nouvelle chanson nécessite une connexion à un compte Facebook"
                            data-val="true" />
                        <span class="field-validation-valid" data-valmsg-replace="true" data-valmsg-for="SubmittedBy">
                        </span>
                    </div>
                    @*<div class="editor-label">
                        Titre en portugais <span class="redStar">*</span>
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.SongId)
                        @Html.ValidationMessageFor(model => model.SongId, "Le champ Titre est requis")
                    </div>
                    <div class="editor-label">
                        Titre en français
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.SongId_fr)
                    </div>*@
                    <div class="editor-labelTwoCols">
                        <div class="editor-label">
                            Titre en Portugais <span class="redStar">*</span>
                        </div>
                        <div class="editor-label">
                            Titre en Français
                        </div>
                    </div>
                    <div class="editor-fieldTwoCols">
                        <div class="editor-field">
                            @Html.EditorFor(model => model.SongId)
                            @Html.ValidationMessageFor(model => model.SongId, "Le champ Titre en Portugais est requis")
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.SongId_fr)
                        </div>
                    </div>
                    <div class="editor-label">
                        Lien intégré <i><a href="http://www.youtube.com/youtubeonyoursite?hl=fr " target="_blank">
                            plus d'information</a></i>
                    </div>
                    <div class="editor-field">
                        @Html.TextAreaFor(model => model.Link)
                        @Html.ValidationMessageFor(model => model.Link)
                    </div>
                    <div class="editor-labelTwoCols">
                        <div class="editor-label">
                            Contenu en portugais <span class="redStar">*</span>
                        </div>
                        <div class="editor-label">
                            Contenu en français
                        </div>
                    </div>
                    <div class="editor-fieldTwoCols">
                        <div class="editor-field">
                            <textarea id="Content" cols="50" rows="15" name="Content" data-val-required="Le champ Contenu en portugais est requis."
                                data-val="true" cols="20" class="valid"></textarea>
                            <span data-valmsg-replace="true" data-valmsg-for="Content" class="field-validation-valid">
                            </span>
                        </div>
                        <div class="editor-field">
                            <textarea id="Content_fr" cols="50" rows="15" name="Content_fr" data-val="false"
                                cols="20" class="valid"></textarea>
                            @*   <span data-valmsg-replace="true" data-valmsg-for="Content" class="field-validation-valid">
                            </span>*@
                        </div>
                    </div>
                    <p>
                        <input type="submit" value="Envoyer" id="createButton" />
                    </p>
                </fieldset>

            }
        </div>
    </div>
</section>
<section id="contentMobile" class="body">
    Mobile device detected!
<br /> <a href="@Url.Content("~/App_EN.htm")" >let's go to the mobile song application
    here</a>
</section>
